import type { ExternalRouteType, ComponentType, IconType } from './types'

// 路由元信息
export interface RouteMeta extends Record<PropertyKey, unknown> {
  title?: string
  icon?: string
  iconType?: IconType
  type?: ExternalRouteType
  url?: string
  isAffix?: boolean
  showTitle?: boolean
  hidden?: boolean
  isKeepAlive?: boolean
  fullPage?: boolean
  hiddenBreadcrumb?: boolean
  breadcrumb?: any[]
}

// 路由项
export interface RouteItem {
  path: string
  name: string
  component?: ComponentType
  redirect?: string
  children?: RouteItem[] | null | []
  meta?: RouteMeta
}

export interface BreadcrumbItem {
  path: string
  name?: string
  meta?: RouteMeta
  type?: IconType
}
